import request from '@/utils/request'
// 获取权限点列表
export const getPermissionList = () => {
  return request({
    url: '/sys/permission'
  })
}
// 新增权限
export const addPermission = data => {
  return request({
    url: '/sys/permission',
    method: 'post',
    data
  })
}
// 删除权限
export const delPermission = id => {
  return request({
    url: `/sys/permission/${id}`,
    method: 'delete'
  })
}
// 编辑权限
export const updatePermission = data => {
  return request({
    url: `/sys/permission/${data.id}`,
    method: 'put',
    data
  })
}
// 获取权限详情
export const getPermissionDetail = id => {
  return request({
    url: `/sys/permission/${id}`
  })
}
